<?php
/**
 * User: helu
 * Date: 17-2-14
 * Time: 上午10:49
 */
define("SERVERNAME", "localhost");
define("USERNAME", "a1001221749");
define("PASSWORD", "31415926po");

function getDB()
{
    // 创建连接
    $conn = new mysqli(SERVERNAME, USERNAME, PASSWORD);

    // 检测连接
    if ($conn->connect_error) {
        return null;
    }
    return $conn;
}